<%@ page language="java" import="java.util.*,com.hs.auth.model.*,com.hs.dnms.model.*" pageEncoding="utf-8"%>
<%
	DnmsMagazine obj = (DnmsMagazine)request.getAttribute("obj"); 
	List paraList = (List)request.getAttribute("paraList"); 
	List symList = (List)request.getAttribute("symList"); 
	List poiList = (List)request.getAttribute("poiList"); 
	Set disset = obj.getDisset();
   	Iterator iter1 = disset.iterator();
  	 DnmsDisease disobj = null;
  	 while(iter1.hasNext()){
   		disobj = (DnmsDisease)iter1.next();
 	 }
     
 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="../../include.jsp"%>  

<script language="javascript" type="text/javascript">
 function downLoadFile(id){
 	window.location.href="<%=basePath%>produce/downloadFile.do?pid="+id;
 } 
 //方剂信息
  function preInfo(id){
    window.parent.auditpre.frameElement.src = "<%=basePath%>audit/auditpre.do?symid="+id;
 } 
 //穴位信息
  function pointInfo(id){
    window.parent.auditpre.frameElement.src = "<%=basePath%>audit/auditpoint.do?pgroupid="+id;
 }        
</script>
</head>
<body>
<div class="deta_proce">
    <div>
        <table border="0" cellspacing="0" cellpadding="0"> 
        <caption>
          题录信息
          </caption>
          <tr>
            <td width="15%">题名</td>
            <td width="35%"><%=StringUtilTool.NULL2Blank(obj.getMaganame()) %><input name="magaid" type="hidden" value="<%=obj.getId()%>"/></td>
            <td width="15%">作者</td>
            <td width="35%"><%=StringUtilTool.NULL2Blank(obj.getAuthor())%></td>
          </tr>
          <tr>
            <td width="15%">刊名</td>
            <td width="85%" colspan=3><%=StringUtilTool.NULL2Blank(obj.getPeriodicalname()) %></td> 
          </tr>
          <tr>
            <td width="15%">出版年份</td>
            <td width="35%"><%=StringUtilTool.NULL2Blank(obj.getYear()) %></td>
            <td width="15%">期号</td>
            <td width="35%"><%=StringUtilTool.NULL2Blank(obj.getPeriod()) %></td>
          </tr> 
           <tr>
            <td width="15%">已上传文件</td>
            <td width="85%" colspan=3>
             <%
             if(null != obj.getFileset() && !(obj.getFileset().isEmpty())){
                   Iterator iter = obj.getFileset().iterator();
                   int i = 0;  
                   while(iter.hasNext()){
          	             DnmsFile fileobj = (DnmsFile)iter.next();
          	             i++; 
          	             Long fileid = fileobj.getId();
          	               
           %>
          	<a href="javaScript:downLoadFile('<%=fileid %>')"><%=fileobj.getFilename() %></a>;
          <%} }%>
            </td> 
          </tr>
        </table> 
        <table border="0" cellspacing="0" cellpadding="0"> 
          <caption>
           现代疾病信息
          </caption>
          <tr>
            <td width="15%" nowrap>现代中医疾病名称：</td> 
            <td width="35%"><%=StringUtilTool.NULL2Blank(disobj==null?"":disobj.getDiseasename())%></td> 
            <td width="15%" nowrap>现代西医疾病名称：</td> 
            <td width="35%"><%=StringUtilTool.NULL2Blank(disobj==null?"":disobj.getDiseasenamen()) %></td> 
          </tr> 
          <tr>
            <td width="15%" >
           	   治疗方法
            </td> 
            <td colspan=3>
            <%
            	if("1".equals(disobj==null?"":(disobj.getIstangyao()+""))){out.println("汤药治疗;");}
            	if("1".equals(disobj==null?"":(disobj.getIszhongy()+""))){out.println("中成药治疗;");}
            	if("1".equals(disobj==null?"":(disobj.getIswest()+""))){out.println("西医治疗;");}
            	if("1".equals(disobj==null?"":(disobj.getIszhenjiu()+""))){out.println("针灸治疗;");}
            	if("1".equals(disobj==null?"":(disobj.getIstuina()+""))){out.println("推拿治疗;");}
            	if("1".equals(disobj==null?"":(disobj.getIsshoushu()+""))){out.println("手术治疗");}
            %>
			</td>  
          </tr> 
          <tr>
            <td width="15%" >
           	   其它治疗方法
            </td> 
            <td colspan=3>
            <%= StringUtilTool.NULL2Blank(disobj==null?"":disobj.getCuremethod())%>
			</td>  
          </tr> 
           <tr>
            <td width="15%" >
           	   并发症
            </td> 
            <td colspan=3>
            <%
            	String paracontent = "";
            	if(null != paraList){
            		for(int i=0; i<paraList.size(); i++){
            			Map para = (Map)paraList.get(i);
            			paracontent = paracontent + para.get("paradisname") + ";";
            		}
            		out.print(paracontent);
            		
            	}
            %>
			</td>  
          </tr> 
          <tr>
           <td width="15%" >
           	    证候
            </td> 
            <td colspan=3>
            <%
            	if(null != symList){
            		for(int j=0; j<symList.size(); j++){
            			Map sym = (Map)symList.get(j);
            			String symptomname = (String)sym.get("symptomname");
            			if(null != symptomname){
            			
            %>
            <a href="javaScript:preInfo('<%=sym.get("id")%>')"><%=symptomname%></a>;
            <%
            		}
            		}
            	}
             %>
            </td>  
          </tr> 
          <tr>
           <td width="15%" >
           	    穴位组
            </td> 
            <td colspan=3>
            <%
            	if(null != poiList){
            		for(int k=0; k<poiList.size(); k++){
            			Map poi = (Map)poiList.get(k);
            			String pgroupname =(String)poi.get("pgroupname");
            			if(null != pgroupname){
            %>
            <a href="javaScript:pointInfo('<%=poi.get("id")%>')"><%=pgroupname%></a>;
            <%
            		}}
            	}
             %>
            </td>  
          </tr>
        </table>  
        <table border="0" cellspacing="0" cellpadding="0" class="atta_tab">
          <caption>古书籍信息</caption>  
          <tr> 
            <th width="30%">书名</th>
            <th width="70%">引用内容</th>
          </tr>
          <%
          		Set bookset = obj.getBookset();
			   	Iterator iterbook = bookset.iterator();
			  	 DnmsOldfile oldfileobj = null;
			  	 while(iterbook.hasNext()){
			   		oldfileobj = (DnmsOldfile)iterbook.next();
          %>	
          <tr>
          	<td style="word-break:break-all;"><%=StringUtilTool.NULL2Blank(oldfileobj.getBookname()) %></td>
          	<td style="word-break:break-all;"><%=StringUtilTool.NULL2Blank(oldfileobj.getContent()) %></td>
          </tr>
          <% }%>
        </table>
    </div>
</div> 
</body>
</html>

